<template>
  <view>
    My
  </view>
</template>

<script>
  import store from '../../store/store.js'
  export default {
    computed: {
      total() {
        return store.getters.total
      }
    },
    data() {
      return {
        
      };
    },
    methods:{
      setBadge(){
        uni.setTabBarBadge({
          index:2,//tabbar索引值
          text:this.total + ''//'转为字符串'
        })
      }
    },
    onShow(){
      // 在显示cart页面的时候显示徽标
      this.setBadge();
    }
  }
</script>

<style lang="scss">

</style>
